//python wrapper for OptionUtil utility class
#ifndef BOOST_PYTHON_SOURCE
#define BOOST_PYTHON_SOURCE
#endif

#ifndef BOOST_PYTHON_NO_LIB
#define BOOST_PYTHON_NO_LIB
#endif

#include <boost/python.hpp>

using namespace boost::python;
#include "../include/OptionUtil.h"
BOOST_PYTHON_MODULE(OptionUtilPy)
{
    class_<OptionUtil>("OptionUtil", "doc string")
            .def("ND", &OptionUtil::ND)
            .staticmethod("ND")
            .def("CND", &OptionUtil::CND)
            .staticmethod("CND")
            .def("CND2", &OptionUtil::CND2)
            .staticmethod("CND2")
            .def("BND", &OptionUtil::BND)
            .staticmethod("BND")
            .def("CBND", &OptionUtil::CBND)
            .staticmethod("CBND")
            .def("CBND2", &OptionUtil::CBND2)
            .staticmethod("CBND2")
            .def("CBND3", &OptionUtil::CBND3)
            .staticmethod("CBND3")
            .def("CBND4", &OptionUtil::CBND4)
            .staticmethod("CBND4")
            .def("CBNDGeneral", &OptionUtil::CBNDGeneral)
            .staticmethod("CBNDGeneral")
            .def("CNDEV", &OptionUtil::CNDEV)
            .staticmethod("CNDEV")
            .def("ConvertingToCCRate", &OptionUtil::ConvertingToCCRate)

            .def("GBlackScholes", &OptionUtil::GBlackScholes)
            .staticmethod("GBlackScholes")
            .def("Black76", &OptionUtil::Black76)
            .staticmethod("Black76")
            .def("GarmanKolhagen", &OptionUtil::GarmanKolhagen)
            .staticmethod("GarmanKolhagen")
            .def("GDdeltaDvol", &OptionUtil::GDdeltaDvol)
            .staticmethod("GDdeltaDvol")
            .def("GDdeltaDvolDvol", &OptionUtil::GDdeltaDvolDvol)
            .staticmethod("GDdeltaDvolDvol")
            .def("GVegaFromDelta", &OptionUtil::GVegaFromDelta)
            .staticmethod("GVegaFromDelta")
            .def("GGammaFromDelta", &OptionUtil::GGammaFromDelta)
            .staticmethod("GGammaFromDelta")
            .def("GRNDFromInTheMoneyProb", &OptionUtil::GRNDFromInTheMoneyProb)
            .staticmethod("GRNDFromInTheMoneyProb")
            .def("GGammaPFromDelta", &OptionUtil::GGammaPFromDelta)
            .staticmethod("GGammaPFromDelta")
            .def("GVegaPFromDelta", &OptionUtil::GVegaPFromDelta)
            .staticmethod("GVegaPFromDelta")
            .def("MaxDdeltaDvolAsset", &OptionUtil::MaxDdeltaDvolAsset)
            .staticmethod("MaxDdeltaDvolAsset")
            .def("MaxDdeltaDvolStrike", &OptionUtil::MaxDdeltaDvolStrike)
            .staticmethod("MaxDdeltaDvolStrike")
            .def("GMaxGammaVegaatX", &OptionUtil::GMaxGammaVegaatX)
            .staticmethod("GMaxGammaVegaatX")
            .def("GMaxGammaatS", &OptionUtil::GMaxGammaatS)
            .staticmethod("GMaxGammaatS")
            .def("GMaxVegaatS", &OptionUtil::GMaxVegaatS)
            .staticmethod("GMaxVegaatS")
            .def("GForwardDelta", &OptionUtil::GForwardDelta)
            .staticmethod("GForwardDelta")
            .def("GDzetaDvol", &OptionUtil::GDzetaDvol)
            .staticmethod("GDzetaDvol")
            .def("GDzetaDtime", &OptionUtil::GDzetaDtime)
            .staticmethod("GDzetaDtime")
            .def("GInTheMoneyProbability", &OptionUtil::GInTheMoneyProbability)
            .staticmethod("GInTheMoneyProbability")
            .def("GBreakEvenProbability", &OptionUtil::GBreakEvenProbability)
            .staticmethod("GBreakEvenProbability")
            .def("GStrikeFromInTheMoneyProb", &OptionUtil::GStrikeFromInTheMoneyProb)
            .staticmethod("GStrikeFromInTheMoneyProb")
            .def("GStrikeFromDelta", &OptionUtil::GStrikeFromDelta)
            .staticmethod("GStrikeFromDelta")
            .def("InTheMoneyProbFromDelta", &OptionUtil::InTheMoneyProbFromDelta)
            .staticmethod("InTheMoneyProbFromDelta")
            .def("GDeltaFromInTheMoneyProb", &OptionUtil::GDeltaFromInTheMoneyProb)
            .staticmethod("GDeltaFromInTheMoneyProb")
            .def("GDeltaMirrorStrike", &OptionUtil::GDeltaMirrorStrike)
            .staticmethod("GDeltaMirrorStrike")
            .def("GProbabilityMirrorStrike", &OptionUtil::GProbabilityMirrorStrike)
            .staticmethod("GProbabilityMirrorStrike")
            .def("GDeltaMirrorCallPutStrike", &OptionUtil::GDeltaMirrorCallPutStrike)
            .staticmethod("GDeltaMirrorCallPutStrike")
            .def("GGamma", &OptionUtil::GGamma)
            .staticmethod("GGamma")
            .def("GSaddleGamma", &OptionUtil::GSaddleGamma)
            .staticmethod("GSaddleGamma")
            .def("GGammaP", &OptionUtil::GGammaP)
            .staticmethod("GGammaP")
            .def("GDelta", &OptionUtil::GDelta)
            .staticmethod("GDelta")
            .def("GStrikeDelta", &OptionUtil::GStrikeDelta)
            .staticmethod("GStrikeDelta")
            .def("GElasticity", &OptionUtil::GElasticity)
            .staticmethod("GElasticity")
            .def("GDgammaDvol", &OptionUtil::GDgammaDvol)
            .staticmethod("GDgammaDvol")
            .def("GDgammaPDvol", &OptionUtil::GDgammaPDvol)
            .staticmethod("GDgammaPDvol")
            .def("GDgammaDspot", &OptionUtil::GDgammaDspot)
            .staticmethod("GDgammaDspot")
            .def("GDgammaPDspot", &OptionUtil::GDgammaPDspot)
            .staticmethod("GDgammaPDspot")
            .def("GRiskNeutralDensity", &OptionUtil::GRiskNeutralDensity)
            .staticmethod("GRiskNeutralDensity")
            .def("GTheta", &OptionUtil::GTheta)
            .staticmethod("GTheta")
            .def("GThetaDriftLess", &OptionUtil::GThetaDriftLess)
            .staticmethod("GThetaDriftLess")
            .def("GVarianceVega", &OptionUtil::GVarianceVega)
            .staticmethod("GVarianceVega")
            .def("GVarianceVomma", &OptionUtil::GVarianceVomma)
            .staticmethod("GVarianceVomma")
            .def("GVarianceUltima", &OptionUtil::GVarianceUltima)
            .staticmethod("GVarianceUltima")
            .def("GVarianceDelta", &OptionUtil::GVarianceDelta)
            .staticmethod("GVarianceDelta")
            .def("GVega", &OptionUtil::GVega)
            .staticmethod("GVega")
            .def("GVegaP", &OptionUtil::GVegaP)
            .staticmethod("GVegaP")
            .def("GDdeltaDtime", &OptionUtil::GDdeltaDtime)
            .staticmethod("GDdeltaDtime")
            .def("GProfitLossSTD", &OptionUtil::GProfitLossSTD)
            .staticmethod("GProfitLossSTD")
            .def("GDvegaDvol", &OptionUtil::GDvegaDvol)
            .staticmethod("GDvegaDvol")
            .def("GDvegaPDvol", &OptionUtil::GDvegaPDvol)
            .staticmethod("GDvegaPDvol")
            .def("GDvegaDtime", &OptionUtil::GDvegaDtime)
            .staticmethod("GDvegaDtime")
            .def("GDvommaDvol", &OptionUtil::GDvommaDvol)
            .staticmethod("GDvommaDvol")
            .def("GDgammaDtime", &OptionUtil::GDgammaDtime)
            .staticmethod("GDgammaDtime")
            .def("GDgammaPDtime", &OptionUtil::GDgammaPDtime)
            .staticmethod("GDgammaPDtime")
            .def("GVegaLeverage", &OptionUtil::GVegaLeverage)
            .staticmethod("GVegaLeverage")
            .def("GRho", &OptionUtil::GRho)
            .staticmethod("GRho")
            .def("GRhoFO", &OptionUtil::GRhoFO)
            .staticmethod("GRhoFO")
            .def("GPhi", &OptionUtil::GPhi)
            .staticmethod("GPhi")
            .def("GCarry", &OptionUtil::GCarry)
            .staticmethod("GCarry")
            .def("GBlackScholesVariance", &OptionUtil::GBlackScholesVariance)
            .staticmethod("GBlackScholesVariance")
            .def("GBlackScholesNGreeks", &OptionUtil::GBlackScholesNGreeks)
            .staticmethod("GBlackScholesNGreeks")
            .def("CGBlackScholes", &OptionUtil::CGBlackScholes)
            .staticmethod("CGBlackScholes")
            .def("EGBlackScholes", &OptionUtil::EGBlackScholes)
            .staticmethod("EGBlackScholes")
            .def("GBlackScholesVarianceNGreeks", &OptionUtil::GBlackScholesVarianceNGreeks)
            .staticmethod("GBlackScholesVarianceNGreeks")

            .def("GBlackScholesImpVolBisection", &OptionUtil::GBlackScholesImpVolBisection)
            .staticmethod("GBlackScholesImpVolBisection")
            .def("GImpliedVolatilityNR", &OptionUtil::GImpliedVolatilityNR)
            .staticmethod("GImpliedVolatilityNR")

            .def("PerpetualOption", &OptionUtil::PerpetualOption)
            .staticmethod("PerpetualOption")
            .def("EPerpetualOption", &OptionUtil::EPerpetualOption)
            .staticmethod("EPerpetualOption")

            .def("Kc", &OptionUtil::Kc)
            .staticmethod("Kc")
            .def("Kp", &OptionUtil::Kp)
            .staticmethod("Kp")
            .def("phi", &OptionUtil::phi)
            .staticmethod("phi")
            .def("phi2", &OptionUtil::phi2)
            .staticmethod("phi2")
            .def("ksi", &OptionUtil::ksi)
            .staticmethod("ksi")

            .def("BSAmericanCallApprox2002", &OptionUtil::BSAmericanCallApprox2002)
            .staticmethod("BSAmericanCallApprox2002")
            .def("BSAmericanApprox2002", &OptionUtil::BSAmericanApprox2002)
            .staticmethod("BSAmericanApprox2002")
            .def("EBSAmericanApprox2002", &OptionUtil::EBSAmericanApprox2002)
            .staticmethod("EBSAmericanApprox2002")

            .def("BSAmericanCallApprox", &OptionUtil::BSAmericanCallApprox)
            .staticmethod("BSAmericanCallApprox")
            .def("BSAmericanApprox", &OptionUtil::BSAmericanApprox)
            .staticmethod("BSAmericanApprox")
            .def("EBSAmericanApprox", &OptionUtil::EBSAmericanApprox)
            .staticmethod("EBSAmericanApprox")

            .def("BAWAmericanCallApprox", &OptionUtil::BAWAmericanCallApprox)
            .staticmethod("BAWAmericanCallApprox")
            .def("BAWAmericanPutApprox", &OptionUtil::BAWAmericanPutApprox)
            .staticmethod("BAWAmericanPutApprox")
            .def("BAWAmericanApprox", &OptionUtil::BAWAmericanApprox)
            .staticmethod("BAWAmericanApprox")
            .def("EBAWAmericanApprox", &OptionUtil::EBAWAmericanApprox)
            .staticmethod("EBAWAmericanApprox")

            //implied volatilites for american
            .def("BAWAmericanImpVolBisection", &OptionUtil::BAWAmericanImpVolBisection)
            .staticmethod("BAWAmericanImpVolBisection")
            .def("BSAmerican2002ImpVolBisection", &OptionUtil::BSAmerican2002ImpVolBisection)
            .staticmethod("BSAmerican2002ImpVolBisection")







    
            ;
}
